﻿#include <QCoreApplication>

#include "context.h"
#include "bubblesort.h"
#include "selectionsort.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    int array[] = {1, 3, 2, 10, 7};
    int len = 5;

    Context context;
    context.setInput(array, len);

    context.setSortStrategy(new BubbleSort);
    context.sort();
    context.print();

    context.setSortStrategy(new SelectionSort);
    context.sort();
    context.print();

    return a.exec();
}
